//
//  TenderBaseCell.swift
//  SlaughterClient
//
//  Created by 邱仙凯 on 2021/8/10.
//  Copyright © 2021 zwb. All rights reserved.
//

import UIKit
import Kingfisher
class ZyaTenderBaseCell: UITableViewCell {
    
    
    lazy var btn1: ZyaStatusButton = {
        let btn1 = ZyaStatusButton()
        return btn1
    }()
    lazy var lab1: UILabel = {
        let lab1 = UILabel()
        lab1.numberOfLines = 2
        return lab1
    }()
    lazy var lab2: UILabel = {
        let lab2 = UILabel()
        lab2.numberOfLines = 0
        lab2.font = UIFont.systemFont(ofSize: 14)
        lab2.textColor = .darkGray
        return lab2
    }()
    lazy var lab3: UILabel = {
       let lab3 = UILabel()
        lab3.textColor = .lightGray
        lab3.font = UIFont.systemFont(ofSize: 14)
        lab3.numberOfLines = 2
        return lab3
    }()
    lazy var lab4: UILabel = {
        
       let lab4 = UILabel()
        lab4.font = UIFont.systemFont(ofSize: 14)
        lab4.textColor = #colorLiteral(red: 0.9254901961, green: 0.3215686275, blue: 0.06274509804, alpha: 1)
        return lab4
    }()
   lazy var chujiaLab: UILabel = {
      let  chujiaLab = UILabel()
        chujiaLab.textColor = .lightGray
        chujiaLab.font = UIFont.systemFont(ofSize: 14)
        chujiaLab.numberOfLines = 2
        return chujiaLab
    }()
   lazy var oper_btn: UIButton = {
       let oper_btn = UIButton()
        oper_btn.contentMode =  .scaleAspectFit
        oper_btn.imageView?.contentMode = .scaleAspectFit
        oper_btn.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        oper_btn.setTitleColor(#colorLiteral(red: 0, green: 0.4784313725, blue: 1, alpha: 1), for: .normal)
    return oper_btn
    }()
    lazy  var imageV:UIImageView = {
       let imageV = UIImageView()
        imageV.contentMode = .scaleAspectFit
        imageV.layer.cornerRadius = 8
        imageV.layer.masksToBounds = true
        return imageV
    }()
    
    lazy var dingwei:UIImageView = {
        var  dingwei = UIImageView(image: UIImage(named:"dingwei1"))
        dingwei.contentMode = .scaleAspectFit
        return dingwei
    }()
 
    var btn2Closure:((UIButton,String)->())?
    var viewJPClosure:((UIButton,String)->())?
    lazy var titleAttributes:[NSAttributedString.Key : NSObject] = {
        let paraph = NSMutableParagraphStyle()
        //将行间距设置为
        paraph.lineSpacing = 9
        //样式属性集合
        let titleAttributes = [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 17),
                           NSAttributedString.Key.paragraphStyle: paraph]
        return titleAttributes
    }()
   lazy var lab3Attributes:[NSAttributedString.Key : NSObject] = {
        
          
          let paraph2 = NSMutableParagraphStyle()
          //将行间距设置为
          paraph2.lineSpacing = 6
          //样式属性集合
        let  lab3Attributes = [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 14),
                            NSAttributedString.Key.paragraphStyle: paraph2]
        return lab3Attributes
    }()
    let helper = ZyaTenderHelper()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
         self.contentView.addSubview(btn1)
      
        self.contentView.addSubview(lab1)
         
        self.contentView.addSubview(lab2)
        
        self.contentView.addSubview(dingwei)
        
        self.contentView.addSubview(lab3)
        
      
        self.contentView.addSubview(chujiaLab)
         
        self.contentView.addSubview(lab4)
        
        self.contentView.addSubview(oper_btn)
       
        self.contentView.addSubview(imageV)
       

        
    }
    
    
    
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
}
